<?php

namespace App\Http\Controllers;

use App\Models\Menu;
use App\Models\User;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Http\Request;
use Largezhou\Admin\Table\Table;
use Spatie\Permission\Models\Role;

class TestController extends Controller
{
    public function test(Request $request, $path = '')
    {
        /** @var BelongsToMany $role */
        $role = Role::first()->permissions();

        dd($role->getRelated());
    }
}
